import type { DefaultTheme } from 'vitepress'

/**
 * 导航菜单项 文档
 */
const document: DefaultTheme.NavItem =
  {
    text: '文档',
    items: [
      {
        text: 'elsfs-cloud文档',
        link: '/elsfsCloud/introduction',
        activeMatch: '/elsfsCloud/'
      },
      {
        text: 'elsfs-admin文档',
        link: '/elsfsAdmin/index',
        activeMatch: '/elsfsAdmin/'
      },
      {
        text: '项目规范',
        link: 'specification/java/codeStyle',
        activeMatch: '/specification/'
      }
    ]
  }
/**
 * 导航菜单项 教程
 */
const tutorial: DefaultTheme.NavItem = {
  text: '教程',
  items: [
    {
      text: '安全相关',
      items: [
        {
          text: 'spring-security教程',
          link: '/tutorial/security/spring-security/introduce',
          activeMatch: '/tutorial/security/spring-security/'
        },
        {
          text: 'oauth2-authorization-server教程',
          link: '/tutorial/security/oauth2-authorization-server/index',
          activeMatch: '/tutorial/security/oauth2-authorization-server/'
        },
        {
          text: 'jose',
          link: '/tutorial/security/jose/0.jose概况',
          activeMatch: '/tutorial/security/jose/'
        }
      ]
    },
    {
      text: '分布式相关',
      items: [
        {
          text: 'jta',
          link: '/tutorial/distributed/jta/index',
          activeMatch: '/tutorial/distributed/jta/'
        },
        {
          text: 'Docker使用',
          link: '/tutorial/distributed/docker/index',
          activeMatch: '/tutorial/distributed/docker/'
        },
        {
          text: 'compose',
          link: '/tutorial/distributed/compose',
          activeMatch: '/tutorial/distributed/compose/'
        },
        {
          text: 'docker-swarm',
          link: '/tutorial/distributed/docker-swarm/index'
        },
        {
          text: 'k8s',
          link: '/tutorial/distributed/k8s/index'
        },
        {
          text: 'podman',
          link: '/tutorial/distributed/podman/index'
        }
      ]
    },
    {
      text: '其他',
      items: [
        {
          text: 'git使用',
          link: '/tutorial/other/git/index',
          activeMatch: '/tutorial/git/'
        },
        {
          text: 'github-action',
          link: '/tutorial/other/github-action',
          activeMatch: '/tutorial/other/github-action/'
        },
        {
          text: 'minio数据迁移',
          link: '/tutorial/other/minio数据迁移',
          activeMatch: '/tutorial/other/minio数据迁移/'
        }, {
          text: 'SuppressWarnings注解',
          link: '/tutorial/other/SuppressWarnings注解'
        },
        {
          text: 'ws.rs与springwebmvc注解区别',
          link: '/tutorial/other/ws.rs与springwebmvc注解区别'
        },
        {
          text: 'java nio',
          link: '/tutorial/other/java/nio/nio'
        },
        {
          text: 'jsr介绍',
          link: '/tutorial/other/jsr/jsr介绍'
        },
        {
          text: 'jsr规范--jsr311-ws.rs',
          link: '/tutorial/other/jsr/jsr311-ws.rs'
        },
        {
          text: 'jsr规范--依赖注入 jsr330-inject',
          link: '/tutorial/other/jsr/jsr330-inject'
        }
      ]
    },
    {
      text: 'mermaid流程图教程',
      link: '/tutorial/mermaid/usage',
      activeMatch: '/tutorial/mermaid/'
    },
    {
      text: 'git使用',
      link: '/tutorial/git/index',
      activeMatch: '/tutorial/git/'
    }
  ]
}

export function nav(): DefaultTheme.NavItem[] {
  return [document, tutorial]
}
